<?php

namespace App\Http\Controllers\Student;

use App\Criteria\Student\SchoolCensus\StudentSchoolCensusBaseQueryCriteria;
use App\Http\Controllers\Controller;
use App\Http\Controllers\CurlRecordMethod;
use App\Http\Requests\Student\StudentSchoolCensusBaseRequest;
use App\Repositories\Student\StudentSchoolCensusRepository;
use App\Validators\Student\StudentSchoolCensusValidator;
use Illuminate\Support\Facades\Input;


class StudentSchoolCensusesController extends Controller
{

    use CurlRecordMethod;

    protected $index_page='student.schoolCensus.schoolCensusMain';
    protected $add_page='student.schoolCensus.schoolCensusAdd';
    protected $edit_page='student.schoolCensus.schoolCensusEdit';

    protected $repository;
    protected $validator;
    protected $request;


    public function __construct(StudentSchoolCensusRepository $repository,
                                StudentSchoolCensusValidator $validator,
                                StudentSchoolCensusBaseRequest $request)
    {
        $this->repository = $repository;
        $this->validator  = $validator;
        $this->request = $request;
    }

    public function getBaseQueryCriteria(){
        return new StudentSchoolCensusBaseQueryCriteria;
    }

    protected function get_add_data(){
        $student_id=Input::get('student_id');
        return view($this->add_page,compact('student_id'));
    }


}
